#ifndef __pcinterface_h__
#define __pcinterface_h__

#undef EFUNC
#undef EDAT
#ifdef __pcinterface_c__
	#define	EFUNC
	#define EDAT
#else
	#define	EFUNC	extern
	#define EDAT	extern
#endif
#include "compler.h"
enum PCCMDST
{
	CMD_NONE,
	CMD_ATSETI,
	CMD_ATSETV,
	CMD_ATREADI,
	CMD_ATREADV,
	CMD_ATRUN,
	CMD_READVPP,
	CMD_ATSTOP,
	CMD_ATSAVE,
	CMD_ATETOUTV,
	CMD_ATROUTV,
	CMD_ATSETVF,
	CMD_ATREADVF,
	CMD_END
};
struct PZS_ST
{
	float Pgain;
	float Igain;
	float Ik;
};
struct FPS_ST
{
	float A0;
	float A1;
	float A2;
	float B0;
	float B1;
	float B2;
};

union INFDAT
{
	struct PZS_ST vsetdat;
	struct FPS_ST isetdat;
	U8 savedatmode;
	float outv;
};

struct IFMSG
{
	enum PCCMDST cmd;
	union INFDAT dat;
};
EFUNC void Interface(void);
EFUNC struct IFMSG* get_ifcmd(void);

EFUNC void gpt23_start(void);
EFUNC void gpt23_stop(void);
EFUNC void change(void);
EFUNC void up_key(void);
EFUNC void down_key(void);

#undef EFUNC
#undef EDAT

#endif